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
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/common/chrome_paths.h"
7 #include "chrome/test/base/ui_test_utils.h"
8 #include "net/test/embedded_test_server/embedded_test_server.h"
11 // Tests that we throw errors when you try using extension APIs that aren't
12 // supported in content scripts.
13 // Timey-outy on mac. http://crbug.com/89116
14 #if defined(OS_MACOSX)
15 #define MAYBE_Stubs DISABLED_Stubs
17 #define MAYBE_Stubs Stubs
19 IN_PROC_BROWSER_TEST_F(ExtensionApiTest
, MAYBE_Stubs
) {
20 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
22 ASSERT_TRUE(RunExtensionTest("stubs")) << message_
;
24 // Navigate to a simple http:// page, which should get the content script
25 // injected and run the rest of the test.
26 GURL
url(embedded_test_server()->GetURL("/extensions/test_file.html"));
27 ui_test_utils::NavigateToURL(browser(), url
);
29 ResultCatcher catcher
;
30 ASSERT_TRUE(catcher
.GetNextResult());