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

Side by Side Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/hash.h" 6 #include "base/hash.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 string16 query = UTF8ToUTF16( 115 string16 query = UTF8ToUTF16(
116 std::string("xyzxyz" + base::IntToString(next_dummy_search_value_++))); 116 std::string("xyzxyz" + base::IntToString(next_dummy_search_value_++)));
117 ASSERT_EQ(0, ui_test_utils::FindInPage( 117 ASSERT_EQ(0, ui_test_utils::FindInPage(
118 browser()->tab_strip_model()->GetActiveWebContents(), 118 browser()->tab_strip_model()->GetActiveWebContents(),
119 query, true, false, NULL, NULL)); 119 query, true, false, NULL, NULL));
120 } 120 }
121 121
122 private: 122 private:
123 void GetSnapshotFromRendererCallback(bool success, 123 void GetSnapshotFromRendererCallback(bool success,
124 const SkBitmap& bitmap) { 124 const SkBitmap& bitmap) {
125 MessageLoopForUI::current()->Quit(); 125 base::MessageLoopForUI::current()->Quit();
126 ASSERT_EQ(success, true); 126 ASSERT_EQ(success, true);
127 base::FilePath reference = ui_test_utils::GetTestFilePath( 127 base::FilePath reference = ui_test_utils::GetTestFilePath(
128 GetPDFTestDir(), 128 GetPDFTestDir(),
129 base::FilePath().AppendASCII(expected_filename_)); 129 base::FilePath().AppendASCII(expected_filename_));
130 base::PlatformFileInfo info; 130 base::PlatformFileInfo info;
131 ASSERT_TRUE(file_util::GetFileInfo(reference, &info)); 131 ASSERT_TRUE(file_util::GetFileInfo(reference, &info));
132 int size = static_cast<size_t>(info.size); 132 int size = static_cast<size_t>(info.size);
133 scoped_ptr<char[]> data(new char[size]); 133 scoped_ptr<char[]> data(new char[size]);
134 ASSERT_EQ(size, file_util::ReadFile(reference, data.get(), size)); 134 ASSERT_EQ(size, file_util::ReadFile(reference, data.get(), size));
135 135
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 browser()->tab_strip_model()->GetActiveWebContents(), 411 browser()->tab_strip_model()->GetActiveWebContents(),
412 "reloadPDF();")); 412 "reloadPDF();"));
413 observer.Wait(); 413 observer.Wait();
414 414
415 ASSERT_EQ("success", 415 ASSERT_EQ("success",
416 browser()->tab_strip_model()->GetActiveWebContents()-> 416 browser()->tab_strip_model()->GetActiveWebContents()->
417 GetURL().query()); 417 GetURL().query());
418 } 418 }
419 419
420 } // namespace 420 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_mouse_watcher_unittest.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698