Index: chrome/browser/extensions/api/tabs/tabs_test.cc |
diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc |
index 1f74f520cbc5dd72ecb4b8b06d699bdd491695ec..cf7088de64fb3173d9d399de1b18315529b8b39e 100644 |
--- a/chrome/browser/extensions/api/tabs/tabs_test.cc |
+++ b/chrome/browser/extensions/api/tabs/tabs_test.cc |
@@ -263,11 +263,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, UpdateNoPermissions) { |
// Without a callback the function will not generate a result. |
update_tab_function->set_has_callback(true); |
- scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( |
+ scoped_ptr<base::DictionaryValue> result(utils::ToDictionary( |
+ utils::RunFunctionAndReturnSingleResult( |
update_tab_function.get(), |
- "[null, {\"url\": \"neutrinos\"}]", |
- browser())); |
- EXPECT_EQ(base::Value::TYPE_NULL, result->GetType()); |
+ "[null, {\"url\": \"about:blank\", \"pinned\": true}]", |
+ browser()))); |
+ // The url is stripped since the extension does not have tab permissions. |
+ EXPECT_EQ(std::string(), utils::GetString(result.get(), "url")); |
+ EXPECT_TRUE(utils::GetBoolean(result.get(), "pinned")); |
} |
IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, |
@@ -409,6 +412,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryCurrentWindowTabs) { |
// Get tabs in the 'current' window called from non-focused browser. |
scoped_refptr<QueryTabsFunction> function = new QueryTabsFunction(); |
+ function->set_extension(utils::CreateEmptyExtension().get()); |
scoped_ptr<base::ListValue> result(utils::ToList( |
utils::RunFunctionAndReturnSingleResult(function.get(), |
"[{\"currentWindow\":true}]", |
@@ -425,6 +429,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryCurrentWindowTabs) { |
// Get tabs NOT in the 'current' window called from non-focused browser. |
function = new QueryTabsFunction(); |
+ function->set_extension(utils::CreateEmptyExtension().get()); |
result.reset(utils::ToList( |
utils::RunFunctionAndReturnSingleResult(function.get(), |
"[{\"currentWindow\":false}]", |
@@ -506,6 +511,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DontCreateTabInClosingPopupWindow) { |
chrome::CloseWindow(popup_browser); |
scoped_refptr<CreateTabFunction> create_tab_function(new CreateTabFunction()); |
+ create_tab_function->set_extension(utils::CreateEmptyExtension().get()); |
// Without a callback the function will not generate a result. |
create_tab_function->set_has_callback(true); |