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

Side by Side Diff: chrome/renderer/render_view_unittest.cc

Issue 164537: Renames the function CreateTemporaryFilename to CreateTemporaryFile and track... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: CommandLine fix Created 11 years, 4 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
« no previous file with comments | « chrome/installer/util/move_tree_work_item.cc ('k') | net/base/file_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/shared_memory.h" 6 #include "base/shared_memory.h"
7 #include "chrome/common/native_web_keyboard_event.h" 7 #include "chrome/common/native_web_keyboard_event.h"
8 #include "chrome/common/render_messages.h" 8 #include "chrome/common/render_messages.h"
9 #include "chrome/test/render_view_test.h" 9 #include "chrome/test/render_view_test.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // compare it with the expected result. 471 // compare it with the expected result.
472 std::string bitmap_actual; 472 std::string bitmap_actual;
473 EXPECT_TRUE(render_thread_.printer()->GetBitmapChecksum(0, &bitmap_actual)); 473 EXPECT_TRUE(render_thread_.printer()->GetBitmapChecksum(0, &bitmap_actual));
474 if (kTestPages[i].checksum) 474 if (kTestPages[i].checksum)
475 EXPECT_EQ(kTestPages[i].checksum, bitmap_actual); 475 EXPECT_EQ(kTestPages[i].checksum, bitmap_actual);
476 476
477 if (baseline) { 477 if (baseline) {
478 // Save the source data and the bitmap data into temporary files to 478 // Save the source data and the bitmap data into temporary files to
479 // create base-line results. 479 // create base-line results.
480 FilePath source_path; 480 FilePath source_path;
481 file_util::CreateTemporaryFileName(&source_path); 481 file_util::CreateTemporaryFile(&source_path);
482 render_thread_.printer()->SaveSource(0, source_path.value()); 482 render_thread_.printer()->SaveSource(0, source_path.value());
483 483
484 FilePath bitmap_path; 484 FilePath bitmap_path;
485 file_util::CreateTemporaryFileName(&bitmap_path); 485 file_util::CreateTemporaryFile(&bitmap_path);
486 render_thread_.printer()->SaveBitmap(0, bitmap_path.value()); 486 render_thread_.printer()->SaveBitmap(0, bitmap_path.value());
487 } 487 }
488 } 488 }
489 #else 489 #else
490 NOTIMPLEMENTED(); 490 NOTIMPLEMENTED();
491 #endif 491 #endif
492 } 492 }
493 493
494 // Test that we can receive correct DOM events when we send input events 494 // Test that we can receive correct DOM events when we send input events
495 // through the RenderWidget::OnHandleInputEvent() function. 495 // through the RenderWidget::OnHandleInputEvent() function.
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 error.domain.fromUTF8("test_domain"); 857 error.domain.fromUTF8("test_domain");
858 error.reason = net::ERR_ABORTED; 858 error.reason = net::ERR_ABORTED;
859 error.unreachableURL = GURL("http://foo"); 859 error.unreachableURL = GURL("http://foo");
860 WebFrame* web_frame = GetMainFrame(); 860 WebFrame* web_frame = GetMainFrame();
861 WebView* web_view = web_frame->view(); 861 WebView* web_view = web_frame->view();
862 // A cancellation occurred. 862 // A cancellation occurred.
863 view_->DidFailProvisionalLoadWithError(web_view, error, web_frame); 863 view_->DidFailProvisionalLoadWithError(web_view, error, web_frame);
864 // Frame should stay in view-source mode. 864 // Frame should stay in view-source mode.
865 EXPECT_TRUE(web_frame->isViewSourceModeEnabled()); 865 EXPECT_TRUE(web_frame->isViewSourceModeEnabled());
866 } 866 }
OLDNEW
« no previous file with comments | « chrome/installer/util/move_tree_work_item.cc ('k') | net/base/file_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698