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

Side by Side Diff: chrome/test/automation/automation_proxy_uitest.cc

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)
Patch Set: minor cleanups Created 10 years, 4 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 | « chrome/service/service_utility_process_host.cc ('k') | chrome/test/in_process_browser_test.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "app/message_box_flags.h" 8 #include "app/message_box_flags.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 27 matching lines...) Expand all
38 using ui_test_utils::TimedMessageLoopRunner; 38 using ui_test_utils::TimedMessageLoopRunner;
39 using testing::CreateFunctor; 39 using testing::CreateFunctor;
40 using testing::StrEq; 40 using testing::StrEq;
41 using testing::_; 41 using testing::_;
42 42
43 class AutomationProxyTest : public UITest { 43 class AutomationProxyTest : public UITest {
44 protected: 44 protected:
45 AutomationProxyTest() { 45 AutomationProxyTest() {
46 dom_automation_enabled_ = true; 46 dom_automation_enabled_ = true;
47 launch_arguments_.AppendSwitchWithValue(switches::kLang, 47 launch_arguments_.AppendSwitchWithValue(switches::kLang,
48 L"en-US"); 48 "en-US");
49 } 49 }
50 }; 50 };
51 51
52 TEST_F(AutomationProxyTest, GetBrowserWindowCount) { 52 TEST_F(AutomationProxyTest, GetBrowserWindowCount) {
53 int window_count = 0; 53 int window_count = 0;
54 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); 54 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count));
55 EXPECT_EQ(1, window_count); 55 EXPECT_EQ(1, window_count);
56 #ifdef NDEBUG 56 #ifdef NDEBUG
57 ASSERT_FALSE(automation()->GetBrowserWindowCount(NULL)); 57 ASSERT_FALSE(automation()->GetBrowserWindowCount(NULL));
58 #endif 58 #endif
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1488
1489 // Allow some time for the popup to show up and close. 1489 // Allow some time for the popup to show up and close.
1490 PlatformThread::Sleep(sleep_timeout_ms()); 1490 PlatformThread::Sleep(sleep_timeout_ms());
1491 1491
1492 std::wstring expected(L"string"); 1492 std::wstring expected(L"string");
1493 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); 1493 std::wstring jscript = CreateJSString(L"\"" + expected + L"\"");
1494 std::wstring actual; 1494 std::wstring actual;
1495 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); 1495 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual));
1496 ASSERT_EQ(expected, actual); 1496 ASSERT_EQ(expected, actual);
1497 } 1497 }
OLDNEW
« no previous file with comments | « chrome/service/service_utility_process_host.cc ('k') | chrome/test/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698