servo/components/shared
arthmis aa40b8f820
Prompt user for credentials when http request needs it (#34620)
* prompt user to get their credentials

Signed-off-by: Lloyd Massiah artmis9@protonmail.com

move credential prompt to a function

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* add prompt for step 15.4

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* add new prompt definition for user credentials

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* remove default implementation for HttpState which allowed making the embedder_proxy non-optional

- default implementation was only used in tests so created an alternative create_http_state function

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

add credentials to authentication cache

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* add tests that are successful for the happy path

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* add test for user cancels prompt and user inputs incorrect credentials, and refactor shared code between tests

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* handle error when setting username and password in Url and ran formatting

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

renaming test functions

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* change authentication flag to false for proxy authentication. The spec doesn't specify that the flag should be true, and the flag is by default false

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* clean up test code a bit

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* add skeleton implementation to support open harmony and android

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* update warning message to include Android

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* fix build error for OH os and Android

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

* remove unused import to fix warning

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>

---------

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
Co-authored-by: lazypassion <25536767+lazypassion@users.noreply.github.com>
2024-12-28 20:24:11 +00:00
..
background_hang_monitor Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
base Remove size_of_test macro from legacy layout and inline it (#34055) 2024-10-29 14:46:10 +00:00
bluetooth doc(resources): Add documentation to undocumented embedder_traits::resources::Resource variants (#33885) 2024-10-18 03:44:14 +00:00
canvas Replace sparkle with glow in components/canvas (#33918) 2024-11-20 09:05:24 +00:00
compositing Add embedder event for preferred color scheme and respond to it in the LayoutThread (#34532) 2024-12-12 06:17:02 +00:00
devtools Implement console.trace (#34629) 2024-12-18 23:45:06 +00:00
embedder Prompt user for credentials when http request needs it (#34620) 2024-12-28 20:24:11 +00:00
fonts Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00
net Upgrade Rust to 1.82.0 (#34592) 2024-12-12 12:00:51 +00:00
profile Plumb URL into interval profiler tracing events (#34337) 2024-11-22 13:31:00 +00:00
script script: Refactor channels in ScriptThread into receivers and senders (#34776) 2024-12-26 03:34:54 +00:00
script_layout script: Manage <iframe> sizes in Window (#34643) 2024-12-16 15:05:33 +00:00
webrender Remove some unused dependencies (#34355) 2024-11-25 10:29:58 +00:00