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

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

Issue 4974001: base: Get rid of 'using' declaration of StringAppendF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 dom_automation_enabled_ = true; 569 dom_automation_enabled_ = true;
570 launch_arguments_ = CommandLine(CommandLine::NO_PROGRAM); 570 launch_arguments_ = CommandLine(CommandLine::NO_PROGRAM);
571 launch_arguments_.AppendArgPath(document1_); 571 launch_arguments_.AppendArgPath(document1_);
572 } 572 }
573 573
574 FilePath document1_; 574 FilePath document1_;
575 }; 575 };
576 576
577 std::wstring CreateJSStringForDOMQuery(const std::wstring& id) { 577 std::wstring CreateJSStringForDOMQuery(const std::wstring& id) {
578 std::wstring jscript(L"window.domAutomationController"); 578 std::wstring jscript(L"window.domAutomationController");
579 StringAppendF(&jscript, L".send(document.getElementById('%ls').nodeName);", 579 base::StringAppendF(&jscript,
580 id.c_str()); 580 L".send(document.getElementById('%ls').nodeName);",
581 id.c_str());
581 return jscript; 582 return jscript;
582 } 583 }
583 584
584 TEST_F(AutomationProxyTest3, FrameDocumentCanBeAccessed) { 585 TEST_F(AutomationProxyTest3, FrameDocumentCanBeAccessed) {
585 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); 586 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
586 ASSERT_TRUE(window.get()); 587 ASSERT_TRUE(window.get());
587 588
588 scoped_refptr<TabProxy> tab(window->GetTab(0)); 589 scoped_refptr<TabProxy> tab(window->GetTab(0));
589 ASSERT_TRUE(tab.get()); 590 ASSERT_TRUE(tab.get());
590 591
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 int diff_pixels_count = 0; 1696 int diff_pixels_count = 0;
1696 for (int x = 0; x < img_size.width(); ++x) { 1697 for (int x = 0; x < img_size.width(); ++x) {
1697 for (int y = 0; y < img_size.height(); ++y) { 1698 for (int y = 0; y < img_size.height(); ++y) {
1698 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { 1699 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) {
1699 ++diff_pixels_count; 1700 ++diff_pixels_count;
1700 } 1701 }
1701 } 1702 }
1702 } 1703 }
1703 ASSERT_EQ(diff_pixels_count, 0); 1704 ASSERT_EQ(diff_pixels_count, 0);
1704 } 1705 }
OLDNEW
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | chrome/test/startup/feature_startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698