This set of Javascript Multiple Choice Questions & Answers (MCQs) focuses on “JavaScript with WebPageTest”.
1. When does WebPageTest become necessary?
a) To run any common website
b) To run private websites
c) To run QA testing
d) To run media testing
View Answer
Explanation: If you want to run tests on web sites that are not publicly available—like a QA or development environment, or if you can only have your test results stored on your own servers because of legal or other reasons, then installing your own private instance of WebPagetest is the way to go.
2. What is the purpose of the Auth tab in the testing platform?
a) To specify credentials
b) To authorize a page
c) To run the test
d) To run user access
View Answer
Explanation: In the Auth tab you can specify credentials to use if the web site uses HTTP authentication for access.
3. What is the purpose of the Script tab?
a) To edit the coding
b) To run on multiple servers
c) To run more complex tests
d) To run media
View Answer
Explanation: The Script tab can be used to run more complex tests that involve multiple steps including navigate to multiple URLs, etc.
4. Which is the command that is used to spoof the client user agent?
a) setUserAgent
b) spoofAgent
c) spoofClientUserAgent
d) spoofUser
View Answer
Explanation: The setUserAgent spoofs the client user agent.
5. What is the purpose of the Block tab?
a) To block the response
b) To block the request
c) To block the mouse pointer
d) To block the cursor
View Answer
Explanation: The Block tab allows us to block content coming in our request.
6. What is the purpose of the Video tab?
a) To take video of the page
b) To capture screenshots of the test only
c) To take video of the test
d) To capture screenshots of the page
View Answer
Explanation: The Video tab allows you to capture screenshots of your page as it loads and views them as a video.
7. What is the task of the Advanced Panel?
a) Test stop running
b) Loading the pages
c) Skewing the results
d) Loading the server
View Answer
Explanation: In the Advanced panel, you can have the test stop running at document completion. That will tell us when the document.onload event is fired, instead of when all assets on the page are loaded.
8. What is the vulnerability of XHR communications?
a) There is no vulnerability
b) Skewing the results
c) Registration and Skewing the results
d) Registering the test results
View Answer
Explanation: XMLHttpRequest (XHR) is an API in the form of an object whose methods transfer data between a web browser and a web server. XHR communications that may happen after page load could register as new activity and skew the test results.
9. Which of the following methods adds and connects the point to the cubic bezier curve?
a) bezierConnect()
b) bezierCurveTo()
c) Connectbezier()
d) bezierTo()
View Answer
Explanation: A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve. This method adds a new point P to the subpath and connects it to the current point with a cubic Bezier curve.
10. Which of the following methods adds an arc to the current subpath?
a) bezierCurveTo()
b) arcTo()
c) arc()
d) Curve()
View Answer
Explanation: The arc() method adds an arc to the current subpath. The arc() function is fined in the canvas method.
Sanfoundry Global Education & Learning Series – Javascript Programming.
- Check Programming Books
- Practice MCA MCQs
- Check JavaScript Books
- Practice Programming MCQs
- Apply for Computer Science Internship