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

Side by Side Diff: chrome/browser/ui/webui/web_ui_browsertest.cc

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 8 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 #include "chrome/browser/ui/webui/web_ui_browsertest.h" 4 #include "chrome/browser/ui/webui/web_ui_browsertest.h"
5 5
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 GURL(kDummyURL).host(), mock_provider_.Pointer()); 314 GURL(kDummyURL).host(), mock_provider_.Pointer());
315 315
316 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_)); 316 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_));
317 test_data_directory_ = test_data_directory_.Append(kWebUITestFolder); 317 test_data_directory_ = test_data_directory_.Append(kWebUITestFolder);
318 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, 318 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA,
319 &gen_test_data_directory_)); 319 &gen_test_data_directory_));
320 320
321 // TODO(dtseng): should this be part of every BrowserTest or just WebUI test. 321 // TODO(dtseng): should this be part of every BrowserTest or just WebUI test.
322 FilePath resources_pack_path; 322 FilePath resources_pack_path;
323 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 323 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
324 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path); 324 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path, 1.0);
James Hawkins 2012/04/25 20:24:36 This 1.0 should really be in a constant.
sail 2012/04/25 22:18:35 Done.
325 325
326 FilePath mockPath; 326 FilePath mockPath;
327 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &mockPath)); 327 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &mockPath));
328 mockPath = mockPath.AppendASCII("chrome"); 328 mockPath = mockPath.AppendASCII("chrome");
329 mockPath = mockPath.AppendASCII("third_party"); 329 mockPath = mockPath.AppendASCII("third_party");
330 mockPath = mockPath.AppendASCII("mock4js"); 330 mockPath = mockPath.AppendASCII("mock4js");
331 mockPath = mockPath.Append(kMockJS); 331 mockPath = mockPath.Append(kMockJS);
332 AddLibrary(mockPath); 332 AddLibrary(mockPath);
333 AddLibrary(FilePath(kWebUILibraryJS)); 333 AddLibrary(FilePath(kWebUILibraryJS));
334 } 334 }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // testDone directly and expect pass result. 688 // testDone directly and expect pass result.
689 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { 689 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) {
690 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); 690 ASSERT_TRUE(RunJavascriptAsyncTest("testDone"));
691 } 691 }
692 692
693 // Test that calling testDone during RunJavascriptTest still completes when 693 // Test that calling testDone during RunJavascriptTest still completes when
694 // waiting for async result. 694 // waiting for async result.
695 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { 695 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) {
696 ASSERT_TRUE(RunJavascriptTest("testDone")); 696 ASSERT_TRUE(RunJavascriptTest("testDone"));
697 } 697 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698