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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 { | 87 { |
88 m_helper.initialize(); | 88 m_helper.initialize(); |
89 | 89 |
90 std::string urlRoot = "http://www.test.com/"; | 90 std::string urlRoot = "http://www.test.com/"; |
91 KURL url = RegisterMockedUrl(urlRoot, "iframes_test.html"); | 91 KURL url = RegisterMockedUrl(urlRoot, "iframes_test.html"); |
92 const char* iframeSupportFiles[] = { | 92 const char* iframeSupportFiles[] = { |
93 "invisible_iframe.html", | 93 "invisible_iframe.html", |
94 "visible_iframe.html", | 94 "visible_iframe.html", |
95 "zero_sized_iframe.html", | 95 "zero_sized_iframe.html", |
96 }; | 96 }; |
97 for (size_t i = 0; i < arraysize(iframeSupportFiles); ++i) { | 97 for (size_t i = 0; i < WTF_ARRAY_LENGTH(iframeSupportFiles); ++i) { |
98 RegisterMockedUrl(urlRoot, iframeSupportFiles[i]); | 98 RegisterMockedUrl(urlRoot, iframeSupportFiles[i]); |
99 } | 99 } |
100 | 100 |
101 FrameTestHelpers::loadFrame(mainFrame(), url.string().utf8().data()); | 101 FrameTestHelpers::loadFrame(mainFrame(), url.string().utf8().data()); |
102 | 102 |
103 Platform::current()->unitTestSupport()->unregisterMockedURL(url); | 103 Platform::current()->unitTestSupport()->unregisterMockedURL(url); |
104 } | 104 } |
105 | 105 |
106 void TearDown() override | 106 void TearDown() override |
107 { | 107 { |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 m_expectedLoader->loadAsynchronously(request, this); | 707 m_expectedLoader->loadAsynchronously(request, this); |
708 serveRequests(); | 708 serveRequests(); |
709 EXPECT_TRUE(m_didReceiveResponse); | 709 EXPECT_TRUE(m_didReceiveResponse); |
710 EXPECT_TRUE(m_didReceiveData); | 710 EXPECT_TRUE(m_didReceiveData); |
711 EXPECT_TRUE(m_didFinishLoading); | 711 EXPECT_TRUE(m_didFinishLoading); |
712 | 712 |
713 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); | 713 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); |
714 } | 714 } |
715 | 715 |
716 } // namespace blink | 716 } // namespace blink |
OLD | NEW |