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

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

Issue 2641863003: [Extensions Bindings] Add a messaging test (Closed)
Patch Set: . Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/tabs_custom_bindings.js » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "extensions/common/switches.h" 7 #include "extensions/common/switches.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 10
11 // And end-to-end test for extension APIs using native bindings. 11 // And end-to-end test for extension APIs using native bindings.
12 class NativeBindingsApiTest : public ExtensionApiTest { 12 class NativeBindingsApiTest : public ExtensionApiTest {
13 public: 13 public:
14 NativeBindingsApiTest() {} 14 NativeBindingsApiTest() {}
15 ~NativeBindingsApiTest() override {} 15 ~NativeBindingsApiTest() override {}
16 16
17 void SetUpCommandLine(base::CommandLine* command_line) override { 17 void SetUpCommandLine(base::CommandLine* command_line) override {
18 ExtensionApiTest::SetUpCommandLine(command_line); 18 ExtensionApiTest::SetUpCommandLine(command_line);
19 // Note: We don't use a FeatureSwitch::ScopedOverride here because we need 19 // Note: We don't use a FeatureSwitch::ScopedOverride here because we need
20 // the switch to be propogated to the renderer, which doesn't happen with 20 // the switch to be propogated to the renderer, which doesn't happen with
21 // a ScopedOverride. 21 // a ScopedOverride.
22 command_line->AppendSwitchASCII(switches::kNativeCrxBindings, "1"); 22 command_line->AppendSwitchASCII(switches::kNativeCrxBindings, "1");
23 } 23 }
24 24
25 private: 25 private:
26 DISALLOW_COPY_AND_ASSIGN(NativeBindingsApiTest); 26 DISALLOW_COPY_AND_ASSIGN(NativeBindingsApiTest);
27 }; 27 };
28 28
29 IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, SimpleEndToEndTest) { 29 IN_PROC_BROWSER_TEST_F(NativeBindingsApiTest, SimpleEndToEndTest) {
30 embedded_test_server()->ServeFilesFromDirectory(test_data_dir_);
31 ASSERT_TRUE(StartEmbeddedTestServer());
30 ASSERT_TRUE(RunExtensionTest("native_bindings")) << message_; 32 ASSERT_TRUE(RunExtensionTest("native_bindings")) << message_;
31 } 33 }
32 34
33 } // namespace extensions 35 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/tabs_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698