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

Side by Side Diff: content/browser/download/mhtml_generation_browsertest.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/bind.h" 5 #include "base/bind.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_tabstrip.h" 9 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 ui_test_utils::NavigateToURL(browser(), 57 ui_test_utils::NavigateToURL(browser(),
58 test_server()->GetURL("files/google/google.html")); 58 test_server()->GetURL("files/google/google.html"));
59 59
60 WebContents* web_contents = chrome::GetActiveWebContents(browser()); 60 WebContents* web_contents = chrome::GetActiveWebContents(browser());
61 web_contents->GenerateMHTML(path, 61 web_contents->GenerateMHTML(path,
62 base::Bind(&MHTMLGenerationTest::MHTMLGenerated, 62 base::Bind(&MHTMLGenerationTest::MHTMLGenerated,
63 this)); 63 this));
64 64
65 // Block until the MHTML is generated. 65 // Block until the MHTML is generated.
66 ui_test_utils::RunMessageLoop(); 66 content::RunMessageLoop();
67 67
68 EXPECT_TRUE(mhtml_generated()); 68 EXPECT_TRUE(mhtml_generated());
69 EXPECT_GT(file_size(), 0); 69 EXPECT_GT(file_size(), 0);
70 70
71 // Make sure the actual generated file has some contents. 71 // Make sure the actual generated file has some contents.
72 int64 file_size; 72 int64 file_size;
73 ASSERT_TRUE(file_util::GetFileSize(path, &file_size)); 73 ASSERT_TRUE(file_util::GetFileSize(path, &file_size));
74 EXPECT_GT(file_size, 100); 74 EXPECT_GT(file_size, 100);
75 } 75 }
76 76
77 } // namespace 77 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | content/browser/indexed_db/idbbindingutilities_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698