Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(951)

Side by Side Diff: chrome/browser/extensions/all_urls_apitest.cc

Issue 9699061: re-enable AllUrlsApiTest.WhitelistedExtension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/browser/extensions/extension_service.h" 6 #include "chrome/browser/extensions/extension_service.h"
7 #include "chrome/browser/extensions/extension_test_message_listener.h" 7 #include "chrome/browser/extensions/extension_test_message_listener.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
11 #include "chrome/test/base/ui_test_utils.h" 11 #include "chrome/test/base/ui_test_utils.h"
12 12
13 const std::string kAllUrlsTarget = 13 const std::string kAllUrlsTarget =
14 "files/extensions/api_test/all_urls/index.html"; 14 "files/extensions/api_test/all_urls/index.html";
15 15
16 typedef ExtensionApiTest AllUrlsApiTest; 16 typedef ExtensionApiTest AllUrlsApiTest;
17 17
18 // http://crbug.com/118293 18 IN_PROC_BROWSER_TEST_F(AllUrlsApiTest, WhitelistedExtension) {
19 IN_PROC_BROWSER_TEST_F(AllUrlsApiTest, DISABLED_WhitelistedExtension) {
20 // First setup the two extensions. 19 // First setup the two extensions.
21 FilePath extension_dir1 = test_data_dir_.AppendASCII("all_urls") 20 FilePath extension_dir1 = test_data_dir_.AppendASCII("all_urls")
22 .AppendASCII("content_script"); 21 .AppendASCII("content_script");
23 FilePath extension_dir2 = test_data_dir_.AppendASCII("all_urls") 22 FilePath extension_dir2 = test_data_dir_.AppendASCII("all_urls")
24 .AppendASCII("execute_script"); 23 .AppendASCII("execute_script");
25 24
26 // Then add the two extensions to the whitelist. 25 // Then add the two extensions to the whitelist.
27 Extension::ScriptingWhitelist whitelist; 26 Extension::ScriptingWhitelist whitelist;
28 whitelist.push_back(Extension::GenerateIdForPath(extension_dir1)); 27 whitelist.push_back(Extension::GenerateIdForPath(extension_dir1));
29 whitelist.push_back(Extension::GenerateIdForPath(extension_dir2)); 28 whitelist.push_back(Extension::GenerateIdForPath(extension_dir2));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Now verify we can script a regular http page. 99 // Now verify we can script a regular http page.
101 ASSERT_TRUE(test_server()->Start()); 100 ASSERT_TRUE(test_server()->Start());
102 GURL page_url = test_server()->GetURL(kAllUrlsTarget); 101 GURL page_url = test_server()->GetURL(kAllUrlsTarget);
103 ExtensionTestMessageListener listener1a("content script: " + page_url.spec(), 102 ExtensionTestMessageListener listener1a("content script: " + page_url.spec(),
104 false); 103 false);
105 ExtensionTestMessageListener listener1b("execute: " + page_url.spec(), false); 104 ExtensionTestMessageListener listener1b("execute: " + page_url.spec(), false);
106 ui_test_utils::NavigateToURL(browser(), page_url); 105 ui_test_utils::NavigateToURL(browser(), page_url);
107 ASSERT_TRUE(listener1a.WaitUntilSatisfied()); 106 ASSERT_TRUE(listener1a.WaitUntilSatisfied());
108 ASSERT_TRUE(listener1b.WaitUntilSatisfied()); 107 ASSERT_TRUE(listener1b.WaitUntilSatisfied());
109 } 108 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698