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 FrameTestHelpers::loadFrame(mainFrame(), url.string().utf8().data()); | 104 WebURLRequest request; |
| 105 request.initialize(); |
| 106 request.setURL(url); |
| 107 mainFrame()->loadRequest(request); |
| 108 serveRequests(); |
105 | 109 |
106 Platform::current()->unitTestSupport()->unregisterMockedURL(url); | 110 Platform::current()->unitTestSupport()->unregisterMockedURL(url); |
107 } | 111 } |
108 | 112 |
109 void TearDown() | 113 void TearDown() |
110 { | 114 { |
111 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 115 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
112 } | 116 } |
113 | 117 |
114 void serveRequests() | 118 void serveRequests() |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 m_expectedLoader->loadAsynchronously(request, this); | 665 m_expectedLoader->loadAsynchronously(request, this); |
662 serveRequests(); | 666 serveRequests(); |
663 EXPECT_TRUE(m_didReceiveResponse); | 667 EXPECT_TRUE(m_didReceiveResponse); |
664 EXPECT_TRUE(m_didReceiveData); | 668 EXPECT_TRUE(m_didReceiveData); |
665 EXPECT_TRUE(m_didFinishLoading); | 669 EXPECT_TRUE(m_didFinishLoading); |
666 | 670 |
667 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); | 671 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); |
668 } | 672 } |
669 | 673 |
670 } | 674 } |
OLD | NEW |