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

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

Issue 1469783002: Cleanup: Correctly spell success(ful). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format media Created 5 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
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/callback.h" 6 #include "base/callback.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 file_size_ = size; 60 file_size_ = size;
61 quit_closure.Run(); 61 quit_closure.Run();
62 } 62 }
63 63
64 bool has_mhtml_callback_run_; 64 bool has_mhtml_callback_run_;
65 int64 file_size_; 65 int64 file_size_;
66 }; 66 };
67 67
68 // Tests that generating a MHTML does create contents. 68 // Tests that generating a MHTML does create contents.
69 // Note that the actual content of the file is not tested, the purpose of this 69 // Note that the actual content of the file is not tested, the purpose of this
70 // test is to ensure we were successfull in creating the MHTML data from the 70 // test is to ensure we were successful in creating the MHTML data from the
71 // renderer. 71 // renderer.
72 IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateMHTML) { 72 IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateMHTML) {
73 base::FilePath path(temp_dir_.path()); 73 base::FilePath path(temp_dir_.path());
74 path = path.Append(FILE_PATH_LITERAL("test.mht")); 74 path = path.Append(FILE_PATH_LITERAL("test.mht"));
75 75
76 GenerateMHTML(path, embedded_test_server()->GetURL("/simple_page.html")); 76 GenerateMHTML(path, embedded_test_server()->GetURL("/simple_page.html"));
77 ASSERT_FALSE(HasFailure()); 77 ASSERT_FALSE(HasFailure());
78 78
79 // Make sure the actual generated file has some contents. 79 // Make sure the actual generated file has some contents.
80 EXPECT_GT(file_size(), 0); // Verify the size reported by the callback. 80 EXPECT_GT(file_size(), 0); // Verify the size reported by the callback.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Make sure that URLs of both frames are present 142 // Make sure that URLs of both frames are present
143 // (note that these are single-line regexes). 143 // (note that these are single-line regexes).
144 EXPECT_THAT( 144 EXPECT_THAT(
145 mhtml, 145 mhtml,
146 ContainsRegex("Content-Location:.*/frame_tree/page_with_one_frame.html")); 146 ContainsRegex("Content-Location:.*/frame_tree/page_with_one_frame.html"));
147 EXPECT_THAT(mhtml, ContainsRegex("Content-Location:.*/title1.html")); 147 EXPECT_THAT(mhtml, ContainsRegex("Content-Location:.*/title1.html"));
148 } 148 }
149 149
150 } // namespace content 150 } // namespace content
OLDNEW
« no previous file with comments | « components/translate/ios/browser/ios_translate_driver.h ('k') | content/browser/geolocation/wifi_data_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698