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

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

Issue 8540012: Enable extension APIs for content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | « chrome/browser/extensions/extension_messages_browsertest.cc ('k') | chrome/chrome_common.gypi » ('j') | 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/common/chrome_paths.h" 6 #include "chrome/common/chrome_paths.h"
7 #include "chrome/test/base/ui_test_utils.h" 7 #include "chrome/test/base/ui_test_utils.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/test/test_server.h" 9 #include "net/test/test_server.h"
10 10
11 // Tests that we throw errors when you try using extension APIs that aren't 11 // Tests that we throw errors when you try using extension APIs that aren't
12 // supported in content scripts. 12 // supported in content scripts.
13 //
14 // If you have added a new API to extension_api.json and this test starts
15 // failing, most likely you need to either mark it as "unprivileged" (if it
16 // should be available in content scripts) or update the list of privileged APIs
17 // in renderer_extension_bindings.js.
18 // Timey-outy on mac. http://crbug.com/89116 13 // Timey-outy on mac. http://crbug.com/89116
19 #if defined(OS_MACOSX) 14 #if defined(OS_MACOSX)
20 #define MAYBE_Stubs DISABLED_Stubs 15 #define MAYBE_Stubs DISABLED_Stubs
21 #else 16 #else
22 #define MAYBE_Stubs Stubs 17 #define MAYBE_Stubs Stubs
23 #endif 18 #endif
24 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Stubs) { 19 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Stubs) {
25 ASSERT_TRUE(test_server()->Start()); 20 ASSERT_TRUE(test_server()->Start());
26 21
27 ASSERT_TRUE(RunExtensionTest("stubs")) << message_; 22 ASSERT_TRUE(RunExtensionTest("stubs")) << message_;
28 23
29 // Navigate to a simple http:// page, which should get the content script 24 // Navigate to a simple http:// page, which should get the content script
30 // injected and run the rest of the test. 25 // injected and run the rest of the test.
31 GURL url(test_server()->GetURL("file/extensions/test_file.html")); 26 GURL url(test_server()->GetURL("file/extensions/test_file.html"));
32 ui_test_utils::NavigateToURL(browser(), url); 27 ui_test_utils::NavigateToURL(browser(), url);
33 28
34 ResultCatcher catcher; 29 ResultCatcher catcher;
35 ASSERT_TRUE(catcher.GetNextResult()); 30 ASSERT_TRUE(catcher.GetNextResult());
36 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_messages_browsertest.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698