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

Side by Side Diff: Source/web/tests/MHTMLTest.cpp

Issue 272143002: Revert of Fix webkit_unit_tests to use the threaded parser and enable everywhere. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/web/tests/FrameTestHelpers.cpp ('k') | Source/web/tests/PageSerializerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); 75 Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
76 } 76 }
77 77
78 void registerMockedURLLoad(const std::string& url, const WebString& fileName ) 78 void registerMockedURLLoad(const std::string& url, const WebString& fileName )
79 { 79 {
80 URLTestHelpers::registerMockedURLLoad(toKURL(url), fileName, WebString:: fromUTF8("mhtml/"), WebString::fromUTF8("text/html")); 80 URLTestHelpers::registerMockedURLLoad(toKURL(url), fileName, WebString:: fromUTF8("mhtml/"), WebString::fromUTF8("text/html"));
81 } 81 }
82 82
83 void loadURLInTopFrame(const WebURL& url) 83 void loadURLInTopFrame(const WebURL& url)
84 { 84 {
85 FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), url.string( ).utf8().data()); 85 WebURLRequest urlRequest;
86 urlRequest.initialize();
87 urlRequest.setURL(url);
88 m_helper.webView()->mainFrame()->loadRequest(urlRequest);
89 // Make sure any pending request get served.
90 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests( );
86 } 91 }
87 92
88 Page* page() const { return m_helper.webViewImpl()->page(); } 93 Page* page() const { return m_helper.webViewImpl()->page(); }
89 94
90 private: 95 private:
91 FrameTestHelpers::WebViewHelper m_helper; 96 FrameTestHelpers::WebViewHelper m_helper;
92 }; 97 };
93 98
94 // Checks that the domain is set to the actual MHTML file, not the URL it was 99 // Checks that the domain is set to the actual MHTML file, not the URL it was
95 // generated from. 100 // generated from.
(...skipping 11 matching lines...) Expand all
107 Document* document = frame->document(); 112 Document* document = frame->document();
108 ASSERT_TRUE(document); 113 ASSERT_TRUE(document);
109 114
110 EXPECT_STREQ(kFileURL, frame->domWindow()->location().href().ascii().data()) ; 115 EXPECT_STREQ(kFileURL, frame->domWindow()->location().href().ascii().data()) ;
111 116
112 WebCore::SecurityOrigin* origin = document->securityOrigin(); 117 WebCore::SecurityOrigin* origin = document->securityOrigin();
113 EXPECT_STRNE("localhost", origin->domain().ascii().data()); 118 EXPECT_STRNE("localhost", origin->domain().ascii().data());
114 } 119 }
115 120
116 } 121 }
OLDNEW
« no previous file with comments | « Source/web/tests/FrameTestHelpers.cpp ('k') | Source/web/tests/PageSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698