- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / nacl / cross_origin / cors.html
1 <html>
2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7 <head>
8 <title>NaCl Cross-origin Test</title>
9 </head>
10 <body>
11 <h2>NaCl Cross-origin Test</h2>
12 </body>
13 <script type="text/javascript" src="../load_util.js"></script>
14 <script>
15
16 function run() {
17   var embed = load_util.crossOriginEmbed("cors.nmf");
18   // The cross-origin load will succeed due to the server returning CORS
19   // headers.
20   // ... but the nexe is junk data, it can't be parsed.
21   // This error string comes from the NaCl repo:
22   // native_client/src/trusted/service_runtime/nacl_error_code.c
23   load_util.expectLoadFailure(embed, "Bad ELF header magic number");
24   document.body.appendChild(embed);
25 }
26
27 run();
28
29 </script>
30 </html>