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

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

Issue 7042021: Check for integer overflow when validating API function arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyright headers Created 9 years, 7 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 | chrome/renderer/extensions/json_schema_unittest.cc » ('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 "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 "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_list.h" 8 #include "chrome/browser/ui/browser_list.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/test/ui_test_utils.h" 10 #include "chrome/test/ui_test_utils.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 WaitForTabsAndPopups(browser(), 3, 1); 93 WaitForTabsAndPopups(browser(), 3, 1);
94 } 94 }
95 95
96 #if defined(OS_MACOSX) || defined(OS_WIN) 96 #if defined(OS_MACOSX) || defined(OS_WIN)
97 // Focus test fails if there is no window manager on Linux. 97 // Focus test fails if there is no window manager on Linux.
98 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenFocus) { 98 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenFocus) {
99 ASSERT_TRUE(RunExtensionTest("window_open/focus")) << message_; 99 ASSERT_TRUE(RunExtensionTest("window_open/focus")) << message_;
100 } 100 }
101 #endif 101 #endif
102 102
103 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) {
104 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_;
105 }
106
103 class WindowOpenPanelTest : public ExtensionApiTest { 107 class WindowOpenPanelTest : public ExtensionApiTest {
104 virtual void SetUpCommandLine(CommandLine* command_line) { 108 virtual void SetUpCommandLine(CommandLine* command_line) {
105 ExtensionApiTest::SetUpCommandLine(command_line); 109 ExtensionApiTest::SetUpCommandLine(command_line);
106 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); 110 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
107 command_line->AppendSwitch(switches::kEnablePanels); 111 command_line->AppendSwitch(switches::kEnablePanels);
108 } 112 }
109 }; 113 };
110 114
111 // TODO(jianli): Enable it when Panel::CreateNativePanel is implemented. 115 // TODO(jianli): Enable it when Panel::CreateNativePanel is implemented.
112 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, DISABLED_WindowOpenPanel) { 116 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, DISABLED_WindowOpenPanel) {
113 ASSERT_TRUE(RunExtensionTest("window_open/panel")) << message_; 117 ASSERT_TRUE(RunExtensionTest("window_open/panel")) << message_;
114 } 118 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/json_schema_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698