Chromium Code Reviews| Index: ios/web/shell/test/pdf_egtest.mm |
| diff --git a/ios/web/shell/test/pdf_egtest.mm b/ios/web/shell/test/pdf_egtest.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6211c82ade279d06fcc30b0559fae03319b9c42b |
| --- /dev/null |
| +++ b/ios/web/shell/test/pdf_egtest.mm |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import "ios/web/public/test/http_server.h" |
| +#include "ios/web/public/test/http_server_util.h" |
| +#include "ios/web/shell/test/app/navigation_test_util.h" |
| +#import "ios/web/shell/test/earl_grey/shell_base_test_case.h" |
| +#import "ios/web/shell/test/earl_grey/shell_matchers.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +namespace { |
| +// URL spec for test PDF page. |
| +const char kTestPDFURL[] = |
| + "http://ios/web/shell/test/http_server_files/testpage.pdf"; |
| +} // namespace |
| + |
| +using web::shell_test_util::LoadUrl; |
| +using web::test::HttpServer; |
| + |
| +// PDF test cases for the web shell. |
| +@interface PDFTest : ShellBaseTestCase |
| +@end |
| + |
| +@implementation PDFTest |
| + |
| +// Tests MIME type of the loaded PDF document. |
| +- (void)testMIMEType { |
| + web::test::SetUpFileBasedHttpServer(); |
| + LoadUrl(HttpServer::MakeUrl(kTestPDFURL)); |
| + [[EarlGrey selectElementWithMatcher:web::webViewMimeType("application/pdf")] |
|
baxley
2016/07/26 18:21:36
Do you think this method is useful as a helper, wh
Eugene But (OOO till 7-30)
2016/07/27 01:15:46
I don't know the answer. I've made webViewInWebSta
|
| + assertWithMatcher:grey_notNil()]; |
| +} |
| + |
| +@end |