Moving data url test outside post navigation block. Trailing separator comment in...
authorNitish Sakhawalkar <nitsakh@icloud.com>
Thu, 2 Mar 2017 20:14:18 +0000 (12:14 -0800)
committerNitish Sakhawalkar <nitsakh@icloud.com>
Thu, 2 Mar 2017 20:14:18 +0000 (12:14 -0800)
docs/api/browser-window.md
docs/api/web-contents.md
docs/api/webview-tag.md
spec/api-browser-window-spec.js

index 6a9431a..50fbc14 100644 (file)
@@ -1004,7 +1004,7 @@ Same as `webContents.capturePage([rect, ]callback)`.
   * `userAgent` String (optional) - A user agent originating the request.
   * `extraHeaders` String (optional) - Extra headers separated by "\n"
   * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] - (optional)
-  * `baseURLForDataURL` String (optional) - Base url for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. 
+  * `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. 
 
 Same as `webContents.loadURL(url[, options])`.
 
index 314bed1..5e3e8dd 100644 (file)
@@ -541,7 +541,7 @@ that can't be set via `<webview>` attributes.
   * `userAgent` String (optional) - A user agent originating the request.
   * `extraHeaders` String (optional) - Extra headers separated by "\n"
   * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] - (optional)
-  * `baseURLForDataURL` String (optional) - Base url for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. 
+  * `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. 
 
 Loads the `url` in the window. The `url` must contain the protocol prefix,
 e.g. the `http://` or `file://`. If the load should bypass http cache then
index 292af6b..95cd559 100644 (file)
@@ -310,7 +310,7 @@ webview.addEventListener('dom-ready', () => {
   * `userAgent` String (optional) - A user agent originating the request.
   * `extraHeaders` String (optional) - Extra headers separated by "\n"
   * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] - (optional)
-  * `baseURLForDataURL` String (optional) - Base url for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. 
+  * `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files. 
 
 Loads the `url` in the webview, the `url` must contain the protocol prefix,
 e.g. the `http://` or `file://`.
index 78e94b2..5852c8d 100644 (file)
@@ -256,13 +256,6 @@ describe('BrowserWindow module', function () {
         w.loadURL(server.url)
       })
 
-      it('should support support base url for data urls', (done) => {
-        ipcMain.once('answer', function (event, test) {
-          assert.equal(test, 'test')
-          done()
-        })
-        w.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', {baseURLForDataURL: `file://${path.join(fixtures, 'api')}${path.sep}`})
-      })
 
       it('sets the content type header on multi part forms', function (done) {
         w.webContents.on('did-finish-load', () => {
@@ -286,6 +279,14 @@ describe('BrowserWindow module', function () {
         w.loadURL(server.url)
       })
     })
+    
+    it('should support support base url for data urls', (done) => {
+      ipcMain.once('answer', function (event, test) {
+        assert.equal(test, 'test')
+        done()
+      })
+      w.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', {baseURLForDataURL: `file://${path.join(fixtures, 'api')}${path.sep}`})
+    })
   })
 
   describe('will-navigate event', function () {