OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 WebCore::KURL url = RegisterMockedUrl(urlRoot, "iframes_test.html"); | 94 WebCore::KURL url = RegisterMockedUrl(urlRoot, "iframes_test.html"); |
95 const char* iframeSupportFiles[] = { | 95 const char* iframeSupportFiles[] = { |
96 "invisible_iframe.html", | 96 "invisible_iframe.html", |
97 "visible_iframe.html", | 97 "visible_iframe.html", |
98 "zero_sized_iframe.html", | 98 "zero_sized_iframe.html", |
99 }; | 99 }; |
100 for (size_t i = 0; i < arraysize(iframeSupportFiles); ++i) { | 100 for (size_t i = 0; i < arraysize(iframeSupportFiles); ++i) { |
101 RegisterMockedUrl(urlRoot, iframeSupportFiles[i]); | 101 RegisterMockedUrl(urlRoot, iframeSupportFiles[i]); |
102 } | 102 } |
103 | 103 |
104 WebURLRequest request; | 104 FrameTestHelpers::loadFrame(mainFrame(), url.string().utf8().data()); |
105 request.initialize(); | |
106 request.setURL(url); | |
107 mainFrame()->loadRequest(request); | |
108 serveRequests(); | |
109 | 105 |
110 Platform::current()->unitTestSupport()->unregisterMockedURL(url); | 106 Platform::current()->unitTestSupport()->unregisterMockedURL(url); |
111 } | 107 } |
112 | 108 |
113 void TearDown() | 109 void TearDown() |
114 { | 110 { |
115 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 111 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
116 } | 112 } |
117 | 113 |
118 void serveRequests() | 114 void serveRequests() |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 m_expectedLoader->loadAsynchronously(request, this); | 661 m_expectedLoader->loadAsynchronously(request, this); |
666 serveRequests(); | 662 serveRequests(); |
667 EXPECT_TRUE(m_didReceiveResponse); | 663 EXPECT_TRUE(m_didReceiveResponse); |
668 EXPECT_TRUE(m_didReceiveData); | 664 EXPECT_TRUE(m_didReceiveData); |
669 EXPECT_TRUE(m_didFinishLoading); | 665 EXPECT_TRUE(m_didFinishLoading); |
670 | 666 |
671 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); | 667 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); |
672 } | 668 } |
673 | 669 |
674 } | 670 } |
OLD | NEW |