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

Side by Side Diff: chrome/browser/extensions/api/notification/notification_apitest.cc

Issue 11145006: PlatformAppApiTest class should not enable experimental APIs by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/api/notification/notification_api.h" 5 #include "chrome/browser/extensions/api/notification/notification_api.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_function_test_utils.h" 7 #include "chrome/browser/extensions/extension_function_test_utils.h"
8 #include "chrome/common/chrome_switches.h"
8 9
9 using extensions::Extension; 10 using extensions::Extension;
10 11
11 namespace utils = extension_function_test_utils; 12 namespace utils = extension_function_test_utils;
12 13
13 namespace { 14 namespace {
14 15
15 class NotificationApiTest : public PlatformAppApiTest { 16 class NotificationApiTest : public ExtensionApiTest {
17 public:
18 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
19 ExtensionApiTest::SetUpCommandLine(command_line);
20 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
21 }
16 }; 22 };
17 23
18 } // namespace 24 } // namespace
19 25
20 IN_PROC_BROWSER_TEST_F(NotificationApiTest, TestNothing) { 26 IN_PROC_BROWSER_TEST_F(NotificationApiTest, TestNothing) {
21 scoped_refptr<extensions::NotificationShowFunction> 27 scoped_refptr<extensions::NotificationShowFunction>
22 notification_show_function(new extensions::NotificationShowFunction()); 28 notification_show_function(new extensions::NotificationShowFunction());
23 scoped_refptr<Extension> empty_extension(utils::CreateEmptyExtension()); 29 scoped_refptr<Extension> empty_extension(utils::CreateEmptyExtension());
24 30
25 notification_show_function->set_extension(empty_extension.get()); 31 notification_show_function->set_extension(empty_extension.get());
26 notification_show_function->set_has_callback(true); 32 notification_show_function->set_has_callback(true);
27 33
28 scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult( 34 scoped_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
29 notification_show_function, 35 notification_show_function,
30 "[{\"text\": \"Check out Cirque du Soleil\"}]", 36 "[{\"text\": \"Check out Cirque du Soleil\"}]",
31 browser(), utils::NONE)); 37 browser(), utils::NONE));
32 ASSERT_EQ(base::Value::TYPE_BOOLEAN, result->GetType()); 38 ASSERT_EQ(base::Value::TYPE_BOOLEAN, result->GetType());
33 } 39 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/dns/dns_apitest.cc ('k') | chrome/browser/extensions/api/serial/serial_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698