Fix shell regressions and reset Servo embedding direction

This commit is contained in:
2026-05-16 11:23:41 -04:00
parent 7823ecd0a3
commit d076dad356
36 changed files with 683 additions and 1919 deletions
+17 -1
View File
@@ -1,7 +1,7 @@
use std::error::Error;
use ely_browser_core::{BrowserCore, InitialBrowserConfig};
use ely_domain::{CommandIntent, CommandScope, ProfileKind, UrlText};
use ely_domain::{CommandIntent, CommandScope, ProfileKind, SearchEngine, UrlText};
#[test]
fn favorite_command_toggles_active_tab() -> Result<(), Box<dyn Error>> {
@@ -187,6 +187,22 @@ fn open_sync_status_command_opens_sync_status_page() -> Result<(), Box<dyn Error
Ok(())
}
#[test]
fn plain_text_command_searches_with_selected_engine() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
core.set_search_engine(SearchEngine::Google);
core.set_command_query("servo browser");
let intent = core.submit_command()?;
let active_tab = core.active_tab()?;
assert_eq!(intent, Some(CommandIntent::Search("servo browser".to_string())));
assert_eq!(active_tab.url().host().as_deref(), Some("www.google.com"));
assert_eq!(active_tab.url().as_str(), "https://www.google.com/search?q=servo+browser");
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}
#[test]
fn settings_scoped_search_opens_about_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;